﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mine.aspx.cs" Inherits="lauimini_webform.mine" %>

<%@ Import Namespace="lauimini_webform.BLL" %>
<%@ Import Namespace="lauimini_webform.Data" %>
<%@ Import Namespace="lauimini_webform.Models" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="Static/lib/layui-v2.6.3/css/layui.css" rel="stylesheet" />
    <link href="Static/css/index2.css" rel="stylesheet" />
    <title></title>
    <style>
        #body {
            width: 100%;
            height: 945px;
            background-color: #f2f2f2;
            /* padding: 100px;*/
        }

        .pear-container {
            margin: 10px;
        }

        .text-center {
            text-align: center;
        }

        .layui-text {
            line-height: 1.6;
            font-size: 14px;
            color: #666;
        }

        .removeBorder {
            border-width: 0px;
            background-color: none;
            border-style: none;
        }

        .leftBottomHigh {
            height: 500px;
        }

        .rightHigh {
            height: 700px;
        }

        .card {
            width: 250px;
            box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="middle">
        <div id="mtop"></div>
        <div id="body">
            <div class="pear-container">
                <div class="layui-row layui-col-space10">

                    <%
                        MyDBContext dB = new MyDBContext();
                        UserService userService = new UserService();
                        UserTargetService userTargetService = new UserTargetService();
                        string userAccount = Session["userAccount"].ToString();
                        User user = userService.GetUser(userAccount);

                    %>

                    <div class="layui-col-md5">
                        <div class="layui-card">
                            <div class="layui-card-body">
                                <div class="text-center layui-text">
                                    <div class="user-info-header" id="userInfoHead">

                                        <img src="<%=user.headImg == null ? "wwwroot/images/myImge.jpg":user.headImg%>" alt="Alternate Text" id="userAvtar" style="width: 115px; height: 115px;" />
                                    </div>
                                    <h2 style="padding-top: 20px; font-size: 20px;"><%=user.userName%></h2>
                                </div>
                            </div>

                        </div>



                        <div class="layui-card">
                            <div class="layui-card-header">个人信息</div>
                            <div class="layui-card-body leftBottomHigh">

                                <div style="width: 100%; height: 500px;">
                                    <form runat="server">

                                        <div class="layui-form-item">
                                            <label class="layui-form-label">昵称</label>
                                            <div class="layui-input-block">
                                                <asp:TextBox ID="userName" runat="server" placeholder="请输入昵称" autocomplete="off" class="layui-input"></asp:TextBox>

                                            </div>
                                        </div>

                                        <div class="layui-form-item">
                                            <label class="layui-form-label">旧密码</label>
                                            <div class="layui-input-block">
                                                <asp:TextBox ID="oldPassword" runat="server" placeholder="请输入旧密码" autocomplete="off" class="layui-input"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">新密码</label>
                                            <div class="layui-input-block">
                                                <asp:TextBox ID="password" runat="server" placeholder="请输入密码" autocomplete="off" class="layui-input"></asp:TextBox>
                                            </div>
                                        </div>

                                        <div class="layui-form-item">
                                            <label class="layui-form-label">确认密码</label>
                                            <div class="layui-input-block">
                                                <asp:TextBox ID="repassword" runat="server" placeholder="请输入确认密码" autocomplete="off" class="layui-input"></asp:TextBox>
                                            </div>
                                        </div>

                                        <div class="layui-form-item">
                                            <div class="layui-input-block">
                                                <asp:Button ID="submitUser" runat="server" Text="立即提交" class="layui-btn" OnClick="submitUser_Click" />
                                                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                                            </div>
                                        </div>
                                        <hr />



                                        <div style="margin-top: 120px;">
                                            <div class="layui-form-item">
                                                <label class="layui-form-label">头像</label>
                                                <div class="layui-input-block">
                                                    <asp:FileUpload ID="FileUpload1" runat="server" class="layui-input removeBorder" />
                                                </div>
                                            </div>
                                            <div class="layui-form-item">
                                                <div class="layui-input-block">
                                                    <asp:Button ID="submitHead" runat="server" Text="上传头像" class="layui-btn" OnClick="submitHead_Click" />
                                                    <%--<asp:Button ID="downloadHead" runat="server" Text="下载头像" class="layui-btn layui-btn-normal" OnClick="downloadHead_Click" />--%>
                                                </div>
                                            </div>
                                        </div>


                                    </form>
                                </div>






                            </div>
                        </div>
                    </div>





                    <div class="layui-col-md7">
                        <div class="layui-card">
                            <div class="layui-card-header">我的成就</div>
                            <div class="layui-card-body rightHigh">


                                <asp:Repeater ID="myComplish" runat="server">
                                    <ItemTemplate>
                                        <div class="layui-col-md6">
                                            <div class="layui-card" style="border: 1px solid #eee!important; margin: 10px">
                                                <div class="layui-card-header"><%#Eval("description") %></div>
                                                <div class="layui-card-body">
                                                    <%# Eval("detail") %>
                                                </div>
                                            </div>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>




                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</body>
</html>
